Skip to content

[core] Implement Lambda streaming with custom HTTP headers #521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sebsto
Copy link
Contributor

@sebsto sebsto commented Jun 29, 2025

Fix #520

@sebsto sebsto self-assigned this Jun 29, 2025
@sebsto sebsto added the ⚠️ semver/major Breaks existing public API. label Jun 29, 2025
@sebsto sebsto changed the title [WIP] do not merge : work in progress to implement Lambda streaming with custom HTTP headers [WIP] DO NOT MERGE : work in progress to implement Lambda streaming with custom HTTP headers Jun 30, 2025
@sebsto sebsto changed the title [WIP] DO NOT MERGE : work in progress to implement Lambda streaming with custom HTTP headers [WIP] DO NOT MERGE : Implement Lambda streaming with custom HTTP headers Jun 30, 2025
@sebsto sebsto changed the title [WIP] DO NOT MERGE : Implement Lambda streaming with custom HTTP headers [WIP] DO NOT MERGE : [core] Implement Lambda streaming with custom HTTP headers Jul 2, 2025
@sebsto sebsto marked this pull request as draft July 15, 2025 10:51
@sebsto sebsto force-pushed the sebsto/streaming+http-headers branch from 970ecef to b6fb60c Compare July 16, 2025 07:06
@sebsto sebsto changed the title [WIP] DO NOT MERGE : [core] Implement Lambda streaming with custom HTTP headers [core] Implement Lambda streaming with custom HTTP headers Jul 16, 2025
@sebsto sebsto requested a review from Copilot July 16, 2025 07:11
@sebsto sebsto added 🆕 semver/minor Adds new public API. and removed ⚠️ semver/major Breaks existing public API. labels Jul 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Lambda streaming functionality with custom HTTP headers, allowing developers to set HTTP status codes and headers before streaming response bodies. This addresses the need for more control over HTTP response metadata in streaming Lambda functions.

  • Adds StreamingLambdaStatusAndHeadersResponse struct for configuring HTTP status and headers
  • Implements writeStatusAndHeaders extension method on LambdaResponseStreamWriter
  • Updates documentation and examples to demonstrate the new streaming capabilities

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
readme.md Adds documentation and examples for streaming with HTTP headers
Sources/AWSLambdaRuntime/LambdaResponseStreamWriter+Headers.swift Core implementation of headers functionality with response struct and extension methods
Tests/AWSLambdaRuntimeTests/LambdaResponseStreamWriter+HeadersTests.swift Comprehensive test suite covering functionality, error handling, and integration scenarios
Examples/Streaming/Sources/main.swift Updated streaming examples demonstrating headers usage and conditional responses
Examples/Streaming/README.md Enhanced documentation explaining header usage and streaming patterns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[core] Runtime does not support AWS Lambda Streaming specification
1 participant